Electronic devices often include electronic components that are powered by internal or external power sources. In some electronic devices, the power source can be locked in place by a user to secure the power source to the electronic device. For example, with respect to certain removable battery packs, a cavity can be provided in the electronic device to receive and align the battery pack with electrical contacts of an electronic component of the electronic device. The battery pack can then be locked into place within the cavity, such as for example by securing a battery pack retaining cover to the electronic device or by engaging a movable latch or other retaining structure.